#include<iostream>
#include<vector>
#include<queue>
#include<cstring>
#include<cmath>
#include<map>
#include<set>
#include<cstdio>
#include<algorithm>
#define debug(a) cout<<#a<<"="<<a<<endl;
using namespace std;
const int maxn=1e5+1000;
typedef long long LL;
inline LL read(){LL x=0,f=1;char ch=getchar();	while (!isdigit(ch)){if (ch=='-') f=-1;ch=getchar();}while (isdigit(ch)){x=x*10+ch-48;ch=getchar();}
return x*f;}
int main(void){
   cin.tie(0);std::ios::sync_with_stdio(false);
   LL n;cin>>n;
   string A,B;cin>>A>>B;
   vector<string>ans;
   string abc="abc";
   do{
        string temp="";
        for(LL i=1;i<=n;i++){
            temp+=abc;
        }
        ans.push_back(temp);
        string a=string(n,abc[0]);string b=string(n,abc[1]);string c=string(n,abc[2]);
        a+=b;a+=c;
        ans.push_back(a);
   }while(next_permutation(abc.begin(),abc.end()));
   for(auto s:ans){
      bool flag=1;
    ///  cout<<s<<"\n";
      for(LL j=0;j<n*3;j++){
         if(s[j]==A[0]&&s[j+1]==A[1]){
            flag=0;break;
         }
         if(s[j]==B[0]&&s[j+1]==B[1]){
            flag=0;break;
         }
      }
      if(flag){
        cout<<"YES"<<"\n";
        cout<<s<<"\n";
        break;
      }
   }
   return 0;
}
